package com.xcx.robot.mirai.mp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xcx.robot.mirai.entity.team.TeamInfo;
import com.xcx.robot.mirai.mp.mapper.TeamInfoMapper;
import com.xcx.robot.mirai.mp.service.ITeamInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 邢晨旭
 * @since 2021-06-10
 */
@Service
public class TeamInfoServiceImpl extends ServiceImpl<TeamInfoMapper, TeamInfo> implements ITeamInfoService {

    @Override
    public List<TeamInfo> getTeamInfos(Long id) {
        LambdaQueryWrapper<TeamInfo> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(TeamInfo::getTeamId, id);
        queryWrapper.eq(TeamInfo::getDeleteYn, 0);
        return this.list(queryWrapper);
    }
}
